package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsOrderGoodsMapper;
import com.qf.mapper.DtsOrderMapper;
import com.qf.pojo.DtsOrder;
import com.qf.vo.CategorySellAmts;
import com.qf.vo.DayStatis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Wy
 * @version V1.0
 * @Project MavenDemo
 * @Package com.qf.service
 * @Description:
 * @Date 2022/6/18 17:17
 */
@Service
public class OrderServiceImpl implements  OrderService {

    @Autowired
    private DtsOrderMapper mapper;
    @Override
    public int countOrder() {
        QueryWrapper<DtsOrder> objectQueryWrapper = new QueryWrapper<>();
        objectQueryWrapper.eq("deleted", false);
        Integer integer = mapper.selectCount(objectQueryWrapper);
        return integer;
    }

    @Override
    public List<DayStatis> incrCount() {
        List<DayStatis> dayStatis = mapper.staticsIncresOrderCnt();
        return dayStatis;
    }

    @Override
    public List<CategorySellAmts> categoryCount() {
        List<CategorySellAmts> categorySellAmts = mapper.categorySell();
        return categorySellAmts;
    }
}
